<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div class='app-container'>
    <el-form ref="form" :model="client_list" :rules="rules" label-width="100px" id="mvcfm">
      <el-button @click="gotoPage('5E4CEFE6AA3D4309A0456BA9C9C9E4CC?'+vueparams+'')" type='primary' size="mini"><i class='fa fa-reply'></i>返回</el-button>
      <div class="form-unit">
        <span class="mvc-title-left"> 供应商列表 </span>
      </div>
      <el-table :data="client_list">
        <el-table-column label="操作" align="center" width='100' type=''>
          <template slot-scope="scope">
            <el-dropdown trigger="click">
              <span class="el-dropdown-link">操作<i class="el-icon-arrow-down el-icon--right"></i></span>
              <el-dropdown-menu slot="dropdown">
                <el-dropdown-item>
                  <el-link @click="gotoPage('A222B0BED2BA4BDB8A98C8E003D1580B?&CMID='+scope.row.client_id+''+vueparams+'')">查看明细</el-link>
                </el-dropdown-item>
                <el-dropdown-item>
                  <el-link @click="gotoPage('38E69A8530BE45BB93C9ABCE21C8BA6C?&CMID='+scope.row.client_id+''+vueparams+'')">修改</el-link>
                </el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>
          </template>
        </el-table-column>
        <el-table-column label="类型" prop="client_contact">
          <template slot-scope="scope">
            {{getValueName("客户=1,潜在客户=2,供应商=3,公共关系=4",scope.row.client_contact)}}
          </template>
        </el-table-column>
        <el-table-column label="供应商类别" prop="client_class">
          <template slot-scope="scope">
            {{getValueName("组织=1,个人=2",scope.row.client_class)}}
          </template>
        </el-table-column>
        <el-table-column label="供应商条形码" prop="client_barcode">
        </el-table-column>
        <el-table-column label="供应商名称" prop="client_id">
          <template slot-scope="scope">
            <el-link @click="gotoPage('6C772D4230F44BCAAEBE132AB37A9075?&CMID='+scope.row.client_id+''+vueparams+'')" type='primary'>{{scope.row.client_name}}</el-link>
            <el-link @click="gotoPage('A222B0BED2BA4BDB8A98C8E003D1580B?&CMID='+scope.row.client_id+''+vueparams+'')" type='primary'>{{scope.row.client_name}}</el-link>
            <el-link @click="gotoPage('/psi/sale/SupplierDet?CMID='+scope.row.client_id+''+vueparams+'')" type='primary'>{{scope.row.client_name}}</el-link>
            <el-link @click="gotoPage('6E6A20FD2CBF435B8DD1FBCEA9CA18CE?&CMID='+scope.row.client_id+''+vueparams+'')" type='primary'>{{scope.row.client_name}}</el-link>
          </template>
        </el-table-column>
        <el-table-column label="网站地址" prop="client_net">
        </el-table-column>
        <el-table-column label="责任人" prop="pname">
        </el-table-column>
        <el-table-column label="录入时间" prop="client_entime">
        </el-table-column>
      </el-table>
      <pagination v-show="total>0" :total="total" :limit.sync="pageSize" @pagination="getPage" />
    </el-form>
  </div>
</template>
<script>
  import request from '@/utils/request'
  export default {
    name: 'SearchList',
    components: {},
    props: ['popparams'],
    data() {
      return {
        vueparams: this.getVUEParams(""),
        client_list: [],
        loading: false,
        rules: {}
      }
    },
    created() {
      this.getData();
    },
    updated() {},
    mounted() {},
    methods: {
      getData() {
        request({
          method: 'get',
          url: '/xcapi/VUEAction/psi/supplychainmana/SupplierAction/searchList?' + this.vueparams,
        }).then(data => {
          for (var k in data) {
            if (Array.isArray(data[k])) {
              this[k] = data[k];
            } else {
              $.extend(this[k], data[k]);
            }
          }
        })
      },
    },
  }
</script>
